package cn.nange.cmfz.controller;

import cn.nange.cmfz.annotation.LogAnnotation;
import cn.nange.cmfz.entity.Menu;
import cn.nange.cmfz.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("menu")
public class MenuController {
    @Autowired
    private MenuService menuService;
    @ResponseBody
    @RequestMapping("show")
    @LogAnnotation(content="查询所有的菜单信息",type = "show")
    public List<Menu> show(){
        return menuService.showAll();
    }
}
